package com.baj.ldap.exception;

import com.baj.ldap.util.ResponseEnums;
import lombok.Getter;

public class LdapException extends RuntimeException{


    @Getter
    private Integer errCode;

    @Getter
    private String errMsg;

    public LdapException(ResponseEnums responseEnums) {
        this(responseEnums.getCode(), responseEnums.getDesc());
    }

    public LdapException(String message) {
        super(message);
    }

    public LdapException(Integer errcode, String errmsg) {
        super(errmsg);
        this.errCode = errcode;
        this.errMsg = errmsg;
    }

    public LdapException(String message, Throwable cause) {
        super(message, cause);
    }

    public LdapException(Throwable cause) {
        super(cause);
    }

    public LdapException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

}
